<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>1 - Lucklyの博客 - 在阅读中遇见自己</title>
    <meta name="renderer" content="webkit" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>

<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />

<meta name="theme-color" content="#f8f5ec" />
<meta name="msapplication-navbutton-color" content="#f8f5ec">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="#f8f5ec">


<meta name="author" content="Luckly" /><meta name="description" content="今天访问github速度极慢，查阅资料，最主要的原因就是GitHub的分发加速网络域名遭到DNS的污染。为了解决这个问题，可以通过修改host文件，绕过国内的DNS解析，直接访问GitHub的CDN节点，来提升访问速度从而达到加速的目的。
" /><meta name="keywords" content="Hugo, theme, even" />






<meta name="generator" content="Hugo 0.79.1 with even 4.0.0" />


<link rel="canonical" href="https://luckly.work/2021/05/1/" />
<link href="/2021/05/1/" rel="alternate" type="application/rss+xml" title="Lucklyの博客 - 在阅读中遇见自己" />
<link href="/2021/05/1/" rel="feed" type="application/rss+xml" title="Lucklyの博客 - 在阅读中遇见自己" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">

<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<link href="/dist/even.06658218.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.1.20/dist/jquery.fancybox.min.css" integrity="sha256-7TyXnr2YU040zfSP+rEcz29ggW4j56/ujTPwjMzyqFY=" crossorigin="anonymous">
<link rel="stylesheet" href="/css/reset-even.css">


<meta property="og:title" content="1" />
<meta property="og:description" content="今天访问github速度极慢，查阅资料，最主要的原因就是GitHub的分发加速网络域名遭到DNS的污染。为了解决这个问题，可以通过修改host文件，绕过国内的DNS解析，直接访问GitHub的CDN节点，来提升访问速度从而达到加速的目的。" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://luckly.work/2021/05/1/" />
<meta property="article:published_time" content="2021-05-20T11:52:09+08:00" />
<meta property="article:modified_time" content="2021-05-20T11:52:09+08:00" />
<meta itemprop="name" content="1">
<meta itemprop="description" content="今天访问github速度极慢，查阅资料，最主要的原因就是GitHub的分发加速网络域名遭到DNS的污染。为了解决这个问题，可以通过修改host文件，绕过国内的DNS解析，直接访问GitHub的CDN节点，来提升访问速度从而达到加速的目的。">
<meta itemprop="datePublished" content="2021-05-20T11:52:09+08:00" />
<meta itemprop="dateModified" content="2021-05-20T11:52:09+08:00" />
<meta itemprop="wordCount" content="529">



<meta itemprop="keywords" content="" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="1"/>
<meta name="twitter:description" content="今天访问github速度极慢，查阅资料，最主要的原因就是GitHub的分发加速网络域名遭到DNS的污染。为了解决这个问题，可以通过修改host文件，绕过国内的DNS解析，直接访问GitHub的CDN节点，来提升访问速度从而达到加速的目的。"/>

</head>
<body>
<div id="mobile-navbar" class="mobile-navbar">
    <div class="mobile-header-logo">
        <a href="/" class="logo">遇见</a>
    </div>
    <div class="mobile-navbar-icon">
        <span></span>
        <span></span>
        <span></span>
    </div>
</div>
<nav id="mobile-menu" class="mobile-menu slideout-menu">
    <ul class="mobile-menu-list">
        <a href="/post/">
            <li class="mobile-menu-item" title="归档">归档</li>
        </a>
        <a href="/categories/">
            <li class="mobile-menu-item" title="分类">分类</li>
        </a>
        <a href="/tags/">
            <li class="mobile-menu-item" title="标签">标签</li>
        </a>
        <a href="/about/">
            <li class="mobile-menu-item" title="关于我">关于我</li>
        </a>
        <a href="/friend/">
            <li class="mobile-menu-item" title="友链">友链</li>
        </a>
        <a href="https://github.com/ITmxs/">
            <li class="mobile-menu-item" title="阅读清单">阅读清单</li>
        </a>
        
    </ul>
    <form class="search-form" style="position: absolute;">
    <input name="search" type="search" style="height: 28px;padding-left: 30px;"/>
    <input type="image" src="/img/search.svg" alt="Search" style="position: absolute;left: 6px;top: 6px;"/>
</form>


</nav>

<div class="container" id="mobile-panel">
    


    <main id="main" class="main">
        <div class="content-wrapper">
            <div id="content" class="content">
                <article class="post">
  
  <header class="post-header">
    <h1 class="post-title">1</h1>

    <div class="post-meta">
      <span class="post-time"> 2021-05-20 </span>
      
      <span class="more-meta"> 约 529 字 </span>
      <span class="more-meta"> 预计阅读 2 分钟 </span>
      <span id="busuanzi_container_page_pv" class="more-meta"> <span id="busuanzi_value_page_pv"><img src="/img/spinner.svg" alt="spinner.svg"/></span> 次阅读 </span>
    </div>
  </header>

  <div class="post-toc" id="post-toc">
  <h2 class="post-toc-title">文章目录</h2>
  <div class="post-toc-content">
    <nav id="TableOfContents">
  <ul>
    <li>
      <ul>
        <li><a href="#步骤如下">步骤如下：</a>
          <ul>
            <li><a href="#1进入httpsfastlynetipaddresscom">1、进入https://fastly.net.ipaddress.com/</a></li>
            <li><a href="#2查询-githubcom-与-githubglobalsslfastlynet">2、查询 github.com 与 github.global.ssl.fastly.net</a></li>
            <li><a href="#3host文件地址">3.host文件地址</a></li>
            <li><a href="#4在host文件加入">4.在host文件加入</a></li>
            <li><a href="#5在命令提示符中输入ipconfig-displaydns命令回车即可">5.在命令提示符中输入&quot;ipconfig /displaydns&quot;命令回车即可。</a></li>
            <li><a href="#6ping一下">6.ping一下</a></li>
          </ul>
        </li>
      </ul>
    </li>
  </ul>
</nav>
  </div>
</div>
  <div class="post-content">
    <p>今天访问github速度极慢，查阅资料，最主要的原因就是GitHub的分发加速网络域名遭到DNS的污染。为了解决这个问题，可以通过修改host文件，绕过国内的DNS解析，直接访问GitHub的CDN节点，来提升访问速度从而达到加速的目的。</p>
<p>GitHub在国内访问速度慢的原因其实有很多，但最主要的原因就是GitHub的分发加速网络域名遭到DNS的污染。为了解决这个问题，网上有很多文章提供了一个解决方案，就是通过修改Hosts文件，绕过国内的DNS解析，直接访问GitHub的CDN节点，</p>
<h2 id="步骤如下">步骤如下：</h2>
<h3 id="1进入httpsfastlynetipaddresscom">1、进入https://fastly.net.ipaddress.com/</h3>
<p>（据说是全球最好的IP地址查询工具，咋也不敢问，有用就好）</p>
<h3 id="2查询-githubcom-与-githubglobalsslfastlynet">2、查询 github.com 与 github.global.ssl.fastly.net</h3>
<p>其实GitHub用到相关域名有很多，我整理了下，一共有十几个，大家可以一一查询添加</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span><span class="lnt">11
</span><span class="lnt">12
</span><span class="lnt">13
</span><span class="lnt">14
</span><span class="lnt">15
</span><span class="lnt">16
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-fallback" data-lang="fallback">github.global.ssl.fastly.net
github.com

assets-cdn.github.com
documentcloud.github.com
gist.github.com
help.github.com
nodeload.github.com
codeload.github.com
raw.github.com
status.github.com
training.github.com
avatars0.githubusercontent.com
avatars1.githubusercontent.com
avatars2.githubusercontent.com
avatars3.githubusercontent.com
</code></pre></td></tr></table>
</div>
</div><h3 id="3host文件地址">3.host文件地址</h3>
<p>windows  ：</p>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-fallback" data-lang="fallback">C:\Windows\System32\drivers\etc
</code></pre></td></tr></table>
</div>
</div><p>mac</p>
<p>请大家评论添加</p>
<p>linux</p>
<p>请大家评论添加</p>
<h3 id="4在host文件加入">4.在host文件加入</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span><span class="lnt">2
</span><span class="lnt">3
</span><span class="lnt">4
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-fallback" data-lang="fallback">#提升github访问速度的两条记录
140.82.113.3 https://github.com
199.232.69.194	github.global.ssl.fastly.net

</code></pre></td></tr></table>
</div>
</div><h3 id="5在命令提示符中输入ipconfig-displaydns命令回车即可">5.在命令提示符中输入&quot;ipconfig /displaydns&quot;命令回车即可。</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-fallback" data-lang="fallback">ipconfig /flushdns
</code></pre></td></tr></table>
</div>
</div><h3 id="6ping一下">6.ping一下</h3>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre class="chroma"><code class="language-fallback" data-lang="fallback">ping github.com
</code></pre></td></tr></table>
</div>
</div><p>大功告成！</p>
<p>ok</p>
<p><img src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210520114105529.png" alt="image-20210520114105529"></p>
  </div>

  <div class="post-copyright">
  <p class="copyright-item">
    <span class="item-title">文章作者</span>
    <span class="item-content">Luckly</span>
  </p>
  <p class="copyright-item">
    <span class="item-title">上次更新</span>
    <span class="item-content">
        2021-05-20
        
    </span>
  </p>
  
  
</div>
<footer class="post-footer">
    
    <nav class="post-nav">
      
      <a class="next" href="/2021/05/1/">
        <span class="next-text nav-default">1</span>
        <span class="next-text nav-mobile">下一篇</span>
        <i class="iconfont icon-right"></i>
      </a>
    </nav>
  </footer>
  
</article>
            </div>
            

        </div>
    </main>

    

    <div class="back-to-top" id="back-to-top">
        <i class="iconfont icon-up"></i>
    </div>
</div>
<script src="/lib/highlight/highlight.pack.js?v=20171001"></script>
  <script src="https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
  <script src="https://cdn.jsdelivr.net/npm/slideout@1.0.1/dist/slideout.min.js" integrity="sha256-t+zJ/g8/KXIJMjSVQdnibt4dlaDxc9zXr/9oNPeWqdg=" crossorigin="anonymous"></script>
  <script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.1.20/dist/jquery.fancybox.min.js" integrity="sha256-XVLffZaxoWfGUEbdzuLi7pwaUJv1cecsQJQqGLe7axY=" crossorigin="anonymous"></script><script></script><script src="https://cdn.jsdelivr.net/npm/raphael@2.2.7/raphael.min.js" integrity="sha256-67By+NpOtm9ka1R6xpUefeGOY8kWWHHRAKlvaTJ7ONI=" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/flowchart.js@1.8.0/release/flowchart.min.js" integrity="sha256-zNGWjubXoY6rb5MnmpBNefO0RgoVYfle9p0tvOQM+6k=" crossorigin="anonymous"></script><script></script><script src="https://cdn.jsdelivr.net/npm/webfontloader@1.6.28/webfontloader.js" integrity="sha256-4O4pS1SH31ZqrSO2A/2QJTVjTPqVe+jnYgOWUVr7EEc=" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/snapsvg@0.5.1/dist/snap.svg-min.js" integrity="sha256-oI+elz+sIm+jpn8F/qEspKoKveTc5uKeFHNNVexe6d8=" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/underscore@1.8.3/underscore-min.js" integrity="sha256-obZACiHd7gkOk9iIL/pimWMTJ4W/pBsKu+oZnSeBIek=" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/gh/bramp/js-sequence-diagrams@2.0.1/dist/sequence-diagram-min.js" integrity="sha384-8748Vn52gHJYJI0XEuPB2QlPVNUkJlJn9tHqKec6J3q2r9l8fvRxrgn/E5ZHV0sP" crossorigin="anonymous"></script>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bramp/js-sequence-diagrams@2.0.1/dist/sequence-diagram-min.css" integrity="sha384-6QbLKJMz5dS3adWSeINZe74uSydBGFbnzaAYmp+tKyq60S7H2p6V7g1TysM5lAaF" crossorigin="anonymous">
<script type="text/javascript" src="/dist/even.47f727f4.min.js"></script>








</body>
</html>
